<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>

<head>
    <base href="<%=basePath%>"/>
    <title>襄阳蓝芯智能化办公系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="view/bootstrap-3.3.5/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="view/bootstrapvalidator/css/bootstrapValidator.css" />
    <script charset="utf-8" src="view/jquery/jquery-1.10.2.min.js"></script>
    <script charset="utf-8" src="view/bootstrap-3.3.5/js/bootstrap.js"></script>
    <script charset="utf-8" src="view/bootstrapvalidator/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="panel panel-primary">
    <table class="table table-bordered table-hover">
        <thead>
        <tr class="thead-blue">
            <td colspan="4">意向客户详情</td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="col-md-2"><label>客户名称</label></td>
            <td class="col-md-4">${kh.customerName}</td>
            <td class="col-md-2"><label>客户电话</label></td>
            <td class="col-md-4">${kh.phone}</td>
        </tr>
        <tr>
            <td><label>公司性质</label></td>
            <td>
                    ${kh.xingzhi.name}
            </td>
            <td><label>所属行业</label></td>
            <td>
                    ${kh.hangye.name}
            </td>
        </tr>
        <tr>
            <td><label>客户地区</label></td>
            <td>${kh.city}</td>
            <td><label>客户地址</label></td>
            <td>${kh.address}</td>
        </tr>

        <tr>
            <td><label>客户邮编</label></td>
            <td>${kh.address}</td>
            <td><label>客户传真</label></td>
            <td>${kh.fax}</td>
        </tr>
        <tr>
            <td><label>客户邮箱</label></td>
            <td>${kh.email}</td>
            <td><label>单位网站</label></td>
            <td>${kh.url}</td>
        </tr>
        <tr>
            <td><label>开户行</label></td>
            <td>${kh.bank}</td>
            <td><label>客户银行账号</label></td>
            <td>${kh.account}</td>
        </tr>
        <tr>
            <td><label>客户信用</label></td>
            <td colspan="3">
                    ${kh.xinyong.name}


            </td>
        </tr>

        <c:forEach items="${kh.kulxr}" var="lxr">
        <tr class="thead-blue">
            <td colspan="4">客户联系人 </td>
        </tr>

        <tr>
            <td><label>联系人名称</label></td>
            <td>${lxr.contactName}</td>
            <td><label>联系人职位</label></td>
            <td>${lxr.job}</td>
        </tr>
        <tr>
            <td><label>联系人电话</label></td>
            <td>${lxr.phone}</td>
            <td><label>联系人邮箱</label></td>
            <td>${lxr.email}</td>
        </tr>
        <tr>
            <td><label>联系人邮编</label></td>
            <td>${lxr.zipcode}</td>
            <td><label>联系人地址</label></td>
            <td>${lxr.address}</td>
        </tr>
            </c:forEach>
        <tr>
            <td colspan="4" align="center">
                <a type="button" href="javascript:history.back()" class="btn btn-info">返回</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>






<script type="text/javascript">
    $(document).ajaxError(function(event,xhr) {
        if(xhr.status=="403"){//没有权限
            document.location.href = xhr.getResponseHeader("url");
        }else if(xhr.status!="200"){
            //alert("服务器错误!");
            console.log("服务器错误!");
        }
    });
</script>
</body>
</html>